home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
libs
/
knowhow4
/
abs_graf.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-10-10
|
1KB
|
41 lines
#ifndef __ABSTRACT_GRAFICS_H_
#define __ABSTRACT_GRAFICS_H_
/* Struct contains empty shablons of functions. We could derivate classes
from it not thinking about concrete graphics library we shell use.
It provide common code for any DOS, Windows and so on libraries, if
them include the same functions.
This set is only part of Paint class's functions set, described in
PAINT.H. But one of A.G. struct childs - BGI_Font class, does not need
Paint class power, so I broke it to two:
AbstractGraphics ────────- BGI_Font ───── Paint
*/
#include "kh_error.h"
#include "simple.h"
// BGI_FONT.CPP contain remarked main() function. To run it remark this code
// and unremark following code marked "Demo"
struct AbstractGraphics
{
virtual void moveto(int x, int y) {}
virtual void lineto(int x, int y) {}
virtual void fillpoly(int numpoints, int* polypoints) {}
};
///////////////////////////////// D E M O ///////////////////////////////
/*
#include <graphics.h>
struct AbstractGraphics
{
virtual void moveto(int x, int y) { ::moveto(x, y); }
virtual void lineto(int x, int y) { ::lineto(x, y); }
virtual void fillpoly(int numpoints, int* polypoints)
{ ::fillpoly(numpoints, polypoints); }
};
*/
#endif __ABSTRACT_GRAFICS_H_